package Cafezam;

import java.util.Scanner;

public class J10Account {
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		int aid,balance,withDraw,deposit;
		double interestRate,getMonthlyInterestRate;
		String dateCreated;
		
		System.out.println("계좌번호는?");
		aid=sc.nextInt();
		System.out.println("잔액");
		balance=sc.nextInt();		
		System.out.println("월간 이자율");
		interestRate=sc.nextDouble();
		System.out.println("통장개설일은");
		dateCreated=sc.next();
		System.out.println("인출액은?");
		withDraw=sc.nextInt();
		getMonthlyInterestRate=getgetMonthlyInterestRate(balance,interestRate);
		balance=getwithDraw(balance,withDraw);
		System.out.println("잔액:"+balance);
		System.out.println("월이자:"+getMonthlyInterestRate);
		System.out.println("통장 개설날짜:"+dateCreated);
	
	}//main

	private static int getwithDraw(int balance, int withDraw) {
		
		return balance-withDraw;
	}

	private static double getgetMonthlyInterestRate(int balance,double interestRate) {
		
		return (balance*(interestRate/100))/12;
	}


	

}
